#include <iostream>
#include <array>
#include <string>
#include <cstring>

int main()
{
	using namespace std;
	array<int, 5> myArray = { 1, 2, 3, 4, 5 };
	for (int i = 0; i < myArray.size(); i++)
	{
		cout << myArray[i] << ", ";
	}
	cout << endl;
	cout << "Enter a Word: ";
	string word;
	cin >> word;
	char temp;
	int i, j;
	for (j = 0, i = word.size() - 1; j < i; j++, i--)
	{
		temp = word[i];
		word[i] = word[j];
		word[j] = temp;
	}
	cout << word << endl;
	char wordArray[5] = "?ate";
	for (char ch = 'a'; strcmp(wordArray, "mate") ; ch++)
	{
		cout << wordArray << endl;
		wordArray[0] = ch;
	}
	cout << "After loop ends, wordArray is " << wordArray << endl;
	system("pause");
	return 0;
}